Skip to content

feat: add Codex support for extension command registration#1767

Merged
mnriem merged 3 commits intogithub:mainfrom
adri4nlm:feat/codex-extension-registration
Mar 10, 2026
Merged

feat: add Codex support for extension command registration#1767
mnriem merged 3 commits intogithub:mainfrom
adri4nlm:feat/codex-extension-registration

Conversation

@adri4nlm
Copy link
Contributor

@adri4nlm adri4nlm commented Mar 6, 2026

Summary

Add Codex support to extension command registration by adding a codex entry to CommandRegistrar.AGENT_CONFIGS in src/specify_cli/extensions.py.

Description

specify init --ai codex creates projects using .codex/prompts/, but specify extension add did not include Codex in the registrar agent map.

This change makes extension command installation target Codex projects as expected:

  • directory: .codex/prompts
  • format: markdown
  • args placeholder: $ARGUMENTS
  • file extension: .md

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv run pytest
  • Tested with a sample project (if applicable)

uv run pytest result:

============================= 120 passed in 2.92s ==============================

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

Used Codex to help prepare and validate this contribution. All final changes were reviewed by a human.

Copilot AI review requested due to automatic review settings March 6, 2026 01:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Codex CLI to the CommandRegistrar.AGENT_CONFIGS map in extensions.py, enabling specify extension add to register extension commands into Codex projects (targeting .codex/prompts/ with Markdown format and $ARGUMENTS placeholder). The codex key was already present in AGENT_CONFIG in __init__.py and in the release packaging scripts, but was missing from the extension command registrar.

Changes:

  • Adds a "codex" entry to CommandRegistrar.AGENT_CONFIGS with dir: .codex/prompts, format: markdown, args: $ARGUMENTS, and extension: .md.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you address the feedback by Copilot where applicable. If not applicable please describe why. Thanks!

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@adri4nlm
Copy link
Contributor Author

The Copilot feedback has been addressed:

  • test_codex_agent_config_present was already added to tests/test_extensions.py in a previous commit (8b5a502), verifying that "codex" is present in CommandRegistrar.AGENT_CONFIGS with the expected "dir": ".codex/prompts".
  • Additionally, test_extension_registrar_includes_codex has now been added to tests/test_agent_config_consistency.py (551aa5b), following the same pattern used for kiro-cli in that file.

All 120 tests pass.

@adri4nlm adri4nlm requested a review from mnriem March 10, 2026 08:45
@mnriem mnriem requested a review from Copilot March 10, 2026 13:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants